Java: how to initialize String[]?
        Posted  
        
            by Heoa
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Heoa
        
        
        
        Published on 2010-04-01T23:39:43Z
        Indexed on 
            2010/04/01
            23:43 UTC
        
        
        Read the original article
        Hit count: 217
        
Error
% javac  StringTest.java 
StringTest.java:4: variable errorSoon might not have been initialized
        errorSoon[0] = "Error, why?";
Code
public class StringTest {
        public static void main(String[] args) {
                String[] errorSoon;
                errorSoon[0] = "Error, why?";
        }
}
© Stack Overflow or respective owner